A demand for a semiconductor disk unit has been recently increased instead of a magnetic disk unit. The semiconductor disk unit is a non-volatile semiconductor memory such as a flash EEPROM which can electrically erase data at one time, namely, by the batch, and operates like the magnetic disk unit. The semiconductor disk unit has a disadvantage in a storage capacity and a cost thereof compared with the magnetic disk unit, but it has an advantage in high access speed and miniaturization thereof.
The operation of the semiconductor disk unit, particularly the write/read operation of data will be now described.
First, a host transfers data to be written to a semiconductor disk unit. The semiconductor disk unit writes received data on an incorporated flash EEPROM. The write operation of data is executed by the batch as a unit of sector. Data to be written comprises, for example, a 512-byte data portion, a header portion provided with attribute information relating to this data, and an ECC data portion provided with an error correction code (hereinafter referred to as ECC) data. Of which, data corresponding to the data portion is transferred from the host. Assume that the 512-byte data constituting the data portion corresponds to one sector. The header portion and the ECC data portion are generated in the semiconductor disk unit, and they are written on the flash EEPROM together with the data portion.
That is, data in one sector (hereinafter referred to as one sector data) transferred from the host is transferred parallely to the semiconductor disk unit by 8 bits or 16 bits. At this time, one sector data is transferred to a header controller part and an ECC controller part respectively incorporated in the semiconductor disk unit, The header controller part generates a header portion relating to the transferred data based on the same data. The ECC controller part generates ECC data based on the transferred data. Thereafter, the header portion, one sector data and the ECG data are respectively written on the flash EEPROM.
When written data is read, the header portion, the data portion, and the ECC data portion are read by the batch as one sector from the flash EEPROM. Meanwhile, the ECC controller part executes the calculation of the presence or absence of an error bit (or it is sometimes hereinafter referred to as error) in the data portion based on the ECC data portion. If there is no error in the data portion, the semiconductor disk unit transfers the data portion to the host as it is. On the other hand, if there is an error in the data portion, correctable error is corrected by the ECC controller part or a firmware, then the semiconductor disk unit transfers the corrected data to the host.
As mentioned above, if the semiconductor disk unit analyzes the ECC data by the ECC controller part, and decides that there is an error in the data portion read from the flash EEPROM, it executes error correction. The error correction is executed by deciding the presence or absence of the error relative to all bits of one sector data, then correcting the error. Accordingly, assuming that one sector data corresponds to 512 bytes, namely, 512.times.8 bits, for detecting one bit error as an error bit, it is necessary to execute the verification of all 512.times.8 bit data. Accordingly, a burden is imposed on the ECC controller part.
Further, if the number of occurrences of an error bit in one sector data portion is 1 bit, error correction can be executed by the ECC controller part which is constituted by hardware such as a gate circuit, etc. Meanwhile, if the number of an occurrences of error bit is about 2 bits or 3 bits in one sector data portion, error correction can be executed by a firmware. That is, if the number of an occurrences of error bit is about 2 bits or 3 bits, a burden imposed on the firmware increases. The error correction by hardware normally takes longer than the error correction by the firmware. Accordingly, a throughput of the error correction is lowered.
Further, even in the error correction by the firmware, if there is an error bit more than 4 bits in one sector data, the error correction can not be executed. Accordingly, if the bit number of a sector which is a minimum unit of write/read operation relative to the semiconductor disk unit increases, the probability of inclusion or the presence of error bit increases. As a result, the probability of deciding whether the written data is uncorrectable increases.
Still further, there has been known such characteristics that if the semiconductor disk unit repeats data write/read operation more than given times, the probability of occurrence of error bit increases sharply. Accordingly, the semiconductor disk unit executes the following processings if a bit error frequently occurs. First, an error bit is corrected and a program for required processing is normally operated, and finally, the processing required by a host is terminated. Meanwhile, a storage area of a sector where error occurred is prohibited in use relative to the flash EEPROM, and a processing for setting a given area (it is generally called a substituting track which is prepared in advance as a substituting area) as a new storage area is executed. In cases where write/read operation is executed relative to the storage area to be substituted before the processing for setting the substituting track is terminated, it is preferable to have a system in which a program of such processing is not terminated abnormally. However, if such substituting processing frequently occurs, it is prone to deteriorate a high access speed which is a feature of the semiconductor disk unit. Further, if more substituting storage area is secured, more storage capacity of the flash EEPROM increases, thereby impeding the miniaturization of the semiconductor disk unit and entaining the increase of cost.